package com.shj.model;

import lombok.Getter;
import lombok.Setter;

/**
 * @Description TODO restful返回实体
 * @Author songhuajian
 * @Date 2020/3/15 14:17
 **/
@Getter
@Setter
public class ResResult {

    /**
     * 状态码
     */
    private Integer code;
    /**
     * 消息
     */
    private String msg;
    /**
     * 数据
     */
    private Object data;

    public ResResult(){
    }

    public ResResult(Integer code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ResResult(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String toString() {
        return "ResResult{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
